<!-- <template>
	<div></div>
</template>

<script>
	export default {
		data() {
			return {
				height: null, //获取的状态栏高度
				top: null
			}
		},
		created() {
			var that = this;
			let systemInfo = uni.getSystemInfoSync();//获取系统信息
			//获取胶囊按钮到顶部的距离,单位px
			that.top = uni.getMenuButtonBoundingClientRect().top;//胶囊按钮的顶部
			that.height = uni.getMenuButtonBoundingClientRect().height;
			let gap = that.top - systemInfo.statusBarHeight; //动态计算每台手机状态栏到胶囊按钮间距(单位rpx)
			let 
			capsuleHeight = 2*gap+that.height//2*gap是为了让他转为px单位 //胶囊按钮到状态栏的高度
			console.log(capsuleHeight);
		},
	}
</script>

<style>
</style>
 -->